home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / emacssrc.zip / EMACSSRC.TAR / emacs-19.17 / install < prev    next >
Text File  |  1993-06-09  |  22KB  |  494 lines

  1. GNU Emacs Installation Guide
  2. Copyright (c) 1992 Free software Foundation, Inc.
  3.  
  4.    Permission is granted to anyone to make or distribute verbatim copies
  5.    of this document as received, in any medium, provided that the
  6.    copyright notice and permission notice are preserved,
  7.    and that the distributor grants the recipient permission
  8.    for further redistribution as permitted by this notice.
  9.  
  10.    Permission is granted to distribute modified versions
  11.    of this document, or of portions of it,
  12.    under the above conditions, provided also that they
  13.    carry prominent notices stating who last changed them,
  14.    and that any new or changed statements about the activities
  15.    of the Free Software Foundation are approved by the Foundation.
  16.  
  17.  
  18. BUILDING AND INSTALLATION:
  19.  
  20. 1) Make sure your system has enough swapping space allocated to handle
  21. a program whose pure code is 900k bytes and whose data area is at
  22. least 400k and can reach 8Mb or more.  If the swapping space is
  23. insufficient, you will get an error in the command `temacs -batch -l
  24. loadup dump', found in `./src/ymakefile', or possibly when running the
  25. final dumped Emacs.
  26.  
  27. Building Emacs requires about 30 Mb of disk space.  Installed, Emacs
  28. occupies about 20 Mb; this includes the executable files, lisp
  29. libraries, miscellaneous data files, and on-line documentation.
  30.  
  31. 2) Consult `./etc/MACHINES' to see what configuration name you should
  32. give to the `configure' program.  That file sometimes offers hints for
  33. getting around some possible installation problems.
  34.  
  35. 3) In the top directory of the Emacs distribution, run the program
  36. `configure' as follows:
  37.  
  38.     ./configure CONFIGURATION-NAME [--OPTION[=VALUE]] ...
  39.  
  40. The CONFIGURATION-NAME argument should be a configuration name given
  41. in `./etc/MACHINES'.  If omitted, `configure' will try to guess your
  42. system type by inspecting its environment; if it cannot, you must find
  43. the appropriate configuration name in `./etc/MACHINES' and specify it
  44. explicitly.
  45.  
  46. The `--with-x', `--with-x11', and `--with-x10' options specify which
  47. window system Emacs should support.  If you don't want X support,
  48. specify `--with-x=no'.  If all of these options are omitted,
  49. `configure' will try to figure out for itself whether your system has
  50. X11, and arrange to use it if present.
  51.  
  52. The `--x-includes=DIR' and `--x-libraries=DIR' options tell the build
  53. process where the compiler should look for the include files and
  54. object libraries used with the X Window System.  Normally, your
  55. compiler should be able to find these by default; these options should
  56. only be necessary if you have your X Window System files installed in
  57. unusual places.
  58.  
  59. The `--run-in-place' option sets up default values for the path
  60. variables in `./Makefile' so that Emacs will expect to find its data
  61. files (lisp libraries, runnable programs, and the like) in the same
  62. locations they occupy while Emacs builds.  This means that you don't
  63. have to install Emacs in order to run it; it uses its data files as
  64. they were unpacked.
  65.  
  66. The `--with-gcc' option specifies that the build process should
  67. compile Emacs using GCC.  If you don't want to use GCC, specify
  68. `--with-gcc=no'.  If this option is omitted, `configure' will search
  69. for GCC in your load path, and use it if present.
  70.  
  71. The `--srcdir=DIR' option specifies that the configuration and build
  72. processes should look for the Emacs source code in DIR, when DIR is
  73. not the current directory.
  74.  
  75. The `--prefix=PREFIXDIR' option specifies where the installation process
  76. should put emacs and its data files.  This defaults to `/usr/local'.
  77. - Emacs (and the other utilities users run) go in PREFIXDIR/bin
  78.   (unless the `--exec-prefix' option says otherwise).
  79. - The architecture-independent files go in PREFIXDIR/lib/emacs/VERSION
  80.   (where VERSION is the version number of Emacs, like `19.7').
  81. - The architecture-dependent files go in
  82.   PREFIXDIR/lib/emacs/VERSION/CONFIGURATION
  83.   (where CONFIGURATION is the configuration name, like mips-dec-ultrix4.2),
  84.   unless the `--exec-prefix' option says otherwise.
  85.  
  86. The `--exec-prefix=EXECDIR' option allows you to specify a separate
  87. portion of the directory tree for installing architecture-specific
  88. files, like executables and utility programs.  If specified,
  89. - Emacs (and the other utilities users run) go in EXECDIR/bin, and
  90. - The architecture-dependent files go in
  91.   EXECDIR/lib/emacs/VERSION/CONFIGURATION.
  92. EXECDIR/bin should be a directory that is normally in users' PATHs.
  93.  
  94. For example, the command
  95.  
  96.     ./configure mips-dec-ultrix --with-x11
  97.  
  98. configures Emacs to build for a DECstation running Ultrix, with
  99. support for the X11 window system.
  100.  
  101. The `configure' program does not accept abbreviations for its
  102. options.
  103.  
  104. Note that `configure' doesn't do any compilation or installation
  105. itself.  It just creates the files that influence those things:
  106. `./Makefile', `build-install', and `./src/config.h'.  For details on
  107. exactly what it does, see the section called `CONFIGURATION BY HAND',
  108. below.
  109.  
  110. When it is done, `configure' prints a description of what it did and
  111. leaves a copy in the file `config.status'.  That file is also a shell
  112. script which, when run, recreates the same configuration; it contains
  113. the verbal description as a comment.  If `configure' exits with an
  114. error after disturbing the status quo, it removes `config.status'.
  115.  
  116. The work of `configure' can be done by editing various files in the
  117. distribution, but using `configure' is supposed to be simpler.  See
  118. the section called "CONFIGURATION BY HAND" below if you want to do the
  119. configuration yourself.
  120.  
  121. 4) Look at `./lisp/paths.el'; if some of those values are not right
  122. for your system, edit the file `./lisp/site-init.el' containing Emacs
  123. Lisp code to override them; you probably don't want to edit paths.el
  124. itself.  YOU MUST USE THE LISP FUNCTION `setq' TO ASSIGN VALUES,
  125. rather than `defvar', as used by `./lisp/paths.el'.  For example,
  126.  
  127.      (setq news-inews-program "/usr/bin/inews")
  128.  
  129. is how you would override the default value of the variable
  130. news-inews-program (which is "/usr/local/inews").
  131.  
  132. Note that, on some systems, the code you place in site-init.el must
  133. not use expand-file-name or any other function which may look
  134. something up in the system's password and user information database.
  135. See `./PROBLEMS' for more details on which systems this affects.
  136.  
  137. 5) Put into `./lisp/site-init.el' any Emacs Lisp code you want Emacs
  138. to load before it is dumped out.  
  139.  
  140. Note that, on some systems, the code you place in site-init.el must
  141. not use expand-file-name or any other function which may look
  142. something up in the system's password and user information database.
  143. See `./PROBLEMS' for more details on which systems this affects.
  144.  
  145. This file is nonexistent in the distribution.  You do not need to
  146. create it if you have nothing to put in it.
  147.  
  148. 6) Refer to the file `./etc/TERMS' for information on fields you may
  149. wish to add to various termcap entries.  The files `./etc/termcap.ucb'
  150. and `./etc/termcap.dat' may already contain appropriately-modified
  151. entries.
  152.  
  153. 7) Run `make' in the top directory of the Emacs distribution to finish
  154. building Emacs in the standard way.  The final executable file will be
  155. named `src/emacs'.  If you want to have Emacs's executable programs
  156. and data files installed as well, run `make install'.
  157.  
  158. By default, Emacs installs its files in the following directories:
  159.  
  160. `/usr/local/bin' holds the executable programs users normally run -
  161.         `emacs', `etags', `ctags', `b2m', and `emacsclient'.
  162.  
  163. `/usr/local/lib/emacs/VERSION/lisp' holds the Emacs Lisp library;
  164.         `VERSION' stands for the number of the Emacs version
  165.         you are installing, like `18.59' or `19.0'.  Since the
  166.         lisp library changes from one version of Emacs to
  167.         another, including the version number in the path
  168.         allows you to have several versions of Emacs installed
  169.         at the same time; this means that you don't have to
  170.         make Emacs unavailable while installing a new
  171.         version.
  172.  
  173.         Emacs searches for its lisp files in
  174.         `/usr/local/lib/emacs/site-lisp', then in this
  175.         directory.
  176.  
  177. `/usr/local/lib/emacs/VERSION/etc' holds the Emacs tutorial, the DOC
  178.         file, the `yow' database, and other
  179.         architecture-independent files Emacs might need while
  180.         running.  VERSION is as specified for `.../lisp'.
  181.  
  182. `/usr/local/lib/emacs/lock' contains files indicating who is editing
  183.         what, so Emacs can detect editing clashes between
  184.         users.
  185.  
  186. `/usr/local/lib/emacs/VERSION/CONFIGURATION-NAME' contains executable
  187.         programs used by Emacs that users are not expected to
  188.         run themselves.
  189.         `VERSION' is the number of the Emacs version you are
  190.         installing, and `CONFIGURATION-NAME' is the argument
  191.         you gave to the `configure' program to identify the
  192.         architecture and operating system of your machine,
  193.         like `mips-dec-ultrix' or `sparc-sun-sunos'.  Since
  194.         these files are specific to the version of Emacs,
  195.         operating system, and architecture in use, including
  196.         the configuration name in the path allows you to have
  197.         several versions of Emacs for any mix of machines and
  198.         operating systems installed at the same time; this is
  199.         useful for sites at which different kinds of machines
  200.         share the file system Emacs is installed on.
  201.  
  202. `/usr/local/info' holds the on-line documentation for Emacs, known as
  203.         "info files".  Many other GNU programs are documented
  204.         using info files as well, so this directory stands
  205.         apart from the other, Emacs-specific directories.
  206.  
  207. `/usr/local/man/man1' holds the man pages for the programs installed
  208.         in `/usr/local/bin'.
  209.  
  210. If these directories are not what you want, you can specify where to
  211. install Emacs's libraries and data files or where Emacs should search
  212. for its lisp files by giving values for `make' variables as part of
  213. the command.  See the section below called `MAKE VARIABLES' for more
  214. information on this.
  215.  
  216. 8) Check the file `dir' in your site's info directory (usually
  217. /usr/local/info) to make sure that it has a menu entry for the Emacs
  218. info files.
  219.  
  220. 9) If your system uses lock files to interlock access to mailer inbox files,
  221. then you might need to make the program arch-lib/movemail setuid or setgid
  222. to enable it to write the lock files.  We believe this is safe.
  223.  
  224. 10) You are done!
  225.  
  226.  
  227. MAKE VARIABLES
  228.  
  229. You can change where the build process installs Emacs and its data
  230. files by specifying values for `make' variables as part of the `make'
  231. command line.  For example, if you type
  232.  
  233.     make install bindir=/usr/local/gnubin
  234.  
  235. the `bindir=/usr/local/gnubin' argument indicates that the Emacs
  236. executable files should go in `/usr/local/gnubin', not
  237. `/usr/local/bin'.
  238.  
  239. Here is a complete list of the variables you may want to set.
  240.  
  241. `bindir' indicates where to put executable programs that users can
  242.     run.  This defaults to /usr/local/bin.
  243.  
  244. `datadir' indicates where to put the architecture-independent
  245.     read-only data files that Emacs refers to while it runs; it
  246.     defaults to /usr/local/lib.  We create the following
  247.     subdirectories under `datadir':
  248.     - `emacs/VERSION/lisp', containing the Emacs lisp library, and
  249.     - `emacs/VERSION/etc', containing the Emacs tutorial, the DOC
  250.         file, and the `yow' database.
  251.     `VERSION' is the number of the Emacs version you are installing,
  252.     like `18.59' or `19.0'.  Since these files vary from one version
  253.     of Emacs to another, including the version number in the path
  254.     allows you to have several versions of Emacs installed at the
  255.     same time; this means that you don't have to make Emacs
  256.     unavailable while installing a new version.
  257.  
  258. `statedir' indicates where to put architecture-independent data files
  259.     that Emacs modifies while it runs; it defaults to
  260.     /usr/local/lib as well.  We create the following
  261.     subdirectories under `statedir':
  262.     - `emacs/lock', containing files indicating who is editing
  263.         what, so Emacs can detect editing clashes between
  264.         users.
  265.  
  266. `libdir' indicates where to put architecture-specific data files that
  267.     Emacs refers to as it runs; it too defaults to `/usr/local/lib'.
  268.     We create the following subdirectories under `libdir':
  269.     - `emacs/VERSION/CONFIGURATION-NAME', containing executable
  270.         programs used by Emacs that users are not expected to run
  271.         themselves.  
  272.     `VERSION' is the number of the Emacs version you are installing,
  273.     and `CONFIGURATION-NAME' is the argument you gave to the
  274.     `configure' program to identify the architecture and operating
  275.     system of your machine, like `mips-dec-ultrix' or
  276.     `sparc-sun-sunos'.  Since these files are specific to the version
  277.     of Emacs, operating system, and architecture in use, including
  278.     the configuration name in the path allows you to have several
  279.     versions of Emacs for any mix of machines and operating systems
  280.     installed at the same time; this is useful for sites at which
  281.     different kinds of machines share the file system Emacs is
  282.     installed on.
  283.  
  284. `infodir' indicates where to put the info files distributed with
  285.     Emacs; it defaults to `/usr/local/info'.
  286.  
  287. `mandir' indicates where to put the man pages for Emacs and its
  288.     utilities (like `etags'); it defaults to
  289.     `/usr/local/man/man1'.
  290.  
  291. `manext' gives the extension the man pages should be installed with.
  292.     It should contain a period, followed by the appropriate
  293.     digit.  It defaults to `.1'.  For example given the default
  294.     values for `mandir' and `manext', the Emacs man page would be
  295.     installed as `/usr/local/man/man1/emacs.1'.
  296.  
  297. `prefix' doesn't give a path for any specific part of Emacs; instead,
  298.     its value is used to determine the defaults for all the
  299.     architecture-independent path variables - `datadir',
  300.     `statedir', `infodir', and `mandir'.  Its default value is
  301.     `/usr/local'; the other variables add on `lib' or `man' to it
  302.     by default.
  303.  
  304.     For example, suppose your site generally places GNU software
  305.     under `/usr/users/software/gnusoft' instead of `/usr/local'.
  306.     By including
  307.         `prefix=/usr/users/software/gnusoft'
  308.     in the arguments to `make', you can instruct the build process
  309.     to place all of the Emacs data files in the appropriate
  310.     directories under that path.
  311.  
  312. `exec_prefix' serves the same purpose as `prefix', but instead
  313.     determines the default values for the architecture-dependent
  314.     path variables - `bindir' and `libdir'.
  315.  
  316. The above variables serve analogous purposes in the makefiles for all
  317. GNU software; here are some variables specific to Emacs.
  318.  
  319. `lispdir' indicates where Emacs installs and expects its lisp
  320.     library.  Its default value, based on `datadir' (which see),
  321.     is `/usr/local/lib/emacs/VERSION/lisp' (where `VERSION' is as
  322.     described above).
  323.  
  324. `locallisppath' indicates where Emacs should search for lisp files
  325.     specific to your site.  It should be a colon-separated list of
  326.     directories; Emacs checks them in order before checking
  327.     `lispdir'.
  328.  
  329. `lisppath' is the complete list of directories Emacs should search for
  330.     its lisp files; its default value is the concatenation of
  331.     `lispdir' and `locallisppath'.  It should be a colon-separated
  332.     list of directories; Emacs checks them in the order they
  333.     appear.
  334.  
  335. `etcdir' indicates where Emacs should install and expect the rest of
  336.     its architecture-independent data, like the tutorial, DOC
  337.     file, and yow database.  Its default value, based on `datadir'
  338.     (which see), is `/usr/local/lib/emacs/VERSION/etc'.
  339.  
  340. `lockdir' indicates the directory where Emacs keeps track of its
  341.     locking information.  Its default value, based on `statedir'
  342.     (which see), is `/usr/local/lib/emacs/lock'.
  343.  
  344. `archlibdir' indicates where Emacs installs and expects the
  345.     executable files and other architecture-dependent data it uses
  346.     while running.  Its default value, based on `libdir' (which
  347.     see), is `/usr/local/lib/emacs/VERSION/CONFIGURATION-NAME'
  348.     (where VERSION and CONFIGURATION-NAME are as described above).
  349.  
  350. Remember that you must specify any variable values you need each time
  351. you run `make' in the top directory.  If you run `make' once to build
  352. emacs, test it, and then run `make' again to install the files, you
  353. must provide the same variable settings each time.  To make the
  354. settings persist, you can edit them into the `Makefile' in the top
  355. directory, but be aware that running the `configure' program erases
  356. `Makefile' and rebuilds it from `Makefile.in'.
  357.  
  358. The top-level Makefile stores the variable settings it used in the
  359. Makefiles for the subdirectories, so you don't have to specify them
  360. when running make in the subdirectories.
  361.  
  362.  
  363. CONFIGURATION BY HAND
  364.  
  365. Running the `configure' program performs the following steps.
  366.  
  367. 1) Copy `./src/config.h.in' to `./src/config.h'.
  368.  
  369. 2) Consult `./etc/MACHINES' to see what configuration name you should
  370. use for your system.  Look at the code of the `configure' script to
  371. see which operating system and architecture description files from
  372. `src/s' and `src/m' should be used for that configuration name.  Edit
  373. `src/config.h', and change the two `#include' directives to include
  374. the appropriate system and architecture description files.
  375.  
  376. 2) Edit `./src/config.h' to set the right options for your system.  If
  377. you need to override any of the definitions in the s/*.h and m/*.h
  378. files for your system and machine, do so by editing config.h, not by
  379. changing the s/*.h and m/*.h files.  Occasionally you may need to
  380. redefine parameters used in `./lib-src/movemail.c'.
  381.  
  382. 3) If you're going to use the make utility to build Emacs, copy
  383. `./Makefile.in' to `./Makefile', and then edit that to specify the
  384. appropriate values for the variables in the sections entitled "Things
  385. `configure' Might Edit" and "Where To Install Things."  Note that you
  386. may only need to change the variables `prefix' and `exec_prefix',
  387. since the rest of the variables have reasonable defaults based on
  388. them.
  389.  
  390. 4) Typing `make src/Makefile lib-src/Makefile' builds the
  391. makefiles for the subdirectories, editing in the values for the path
  392. variables you established in step 3.
  393.  
  394. -- or --
  395.  
  396. 4) If you're going to use the build-install script to build Emacs,
  397. copy `./build-install.in' to `./build-install', and edit the similar
  398. definitions found at the top of the script.
  399.  
  400.  
  401. The `configure' script is built from `configure.in' by the `autoconf'
  402. program.  However, since Emacs has configuration requirements that
  403. autoconf can't meet, `configure.in' uses an unholy marriage of
  404. custom-baked configuration code and autoconf macros.  New versions of
  405. autoconf could very well break this arrangement, so it may be wise to
  406. avoid rebuilding `configure' from `configure.in' when possible.
  407.  
  408.  
  409. BUILDING GNU EMACS BY HAND
  410.  
  411. Once Emacs is configured, running `make' or running the shell script
  412. `build-install' in the top directory performs the following steps.
  413.  
  414. 1) Run `make src/paths.h' in the top directory.  This produces
  415. `./src/paths.h' from the template file `./src/paths.h.in', changing
  416. the paths to the values specified in `./Makefile'.
  417.  
  418. 2) Cd to `./lib-src' and run `make'.  This creates executables named
  419. `ctags' and `etags' and `wakeup' and `make-docfile' and `digest-doc'
  420. and `test-distrib'.  And others.
  421.  
  422. 3) Cd to `./src' and Run `make'.  This refers to files in the `./lisp'
  423. and `./lib-src' subdirectories using names `../lisp' and
  424. `../lib-src'.
  425.  
  426. This creates a file `./src/emacs' which is the runnable Emacs,
  427. assigning it a new version number by incrementing the version stored
  428. in `./lisp/version.el'.
  429.  
  430. It also creates a file in `./etc' whose name is `DOC' followed by the
  431. current Emacs version.  This file contains documentation strings for
  432. all the functions in Emacs.  Each time you run make to make a new
  433. emacs, a new DOC file with a new name is made.  You must keep the DOC
  434. file for an Emacs version as long as you keep using that Emacs
  435. version.
  436.  
  437.  
  438. INSTALLATION BY HAND
  439.  
  440. The steps below are done by the shell script `build-install' or by
  441. running `make install' in the main directory of the Emacs
  442. distribution.
  443.  
  444. 1) Copy `./lisp' and its subdirectories, `./etc', and the executables
  445. in `./lib-src' to their final destinations, as selected in `./src/paths.h'.
  446.  
  447. Strictly speaking, not all of the executables in `./lib-src' need be copied.
  448. - The programs `cvtmail', `emacsserver', `env', `fakemail', `hexl',
  449.     `movemail', `timer', `vcdiff', `wakeup', and `yow' are used by
  450.     Emacs; they do need to be copied.
  451. - The programs `etags', `ctags', `emacsclient', `b2m', and `rcs2log'
  452.     are intended to be run by users; they are handled below.
  453. - The programs `make-docfile', `make-path', and `test-distrib' were
  454.     used in building Emacs, and are not needed any more.
  455. - The programs `digest-doc' and `sorted-doc' convert a `DOC' file into
  456.     a file for users to read.  There is no important reason to move them.
  457.  
  458. 2) Copy the files in `./info' to the place specified in
  459. `./lisp/site-init.el' or `./lisp/paths.el'.  Note that if the
  460. destination directory already contains a file named `dir', you
  461. probably don't want to replace it with the `dir' file in the Emacs
  462. distribution.  Instead, you should make sure that the existing `dir'
  463. file contains an appropriate menu entry for the Emacs info.
  464.  
  465. 3) Create a directory for Emacs to use for clash detection, named as
  466. indicated by the PATH_LOCK macro in `./src/paths.h'.
  467.  
  468. 4) Copy `./src/emacs' to `/usr/local/bin', or to some other directory
  469. in users' search paths.  `./src/emacs' has an alternate name
  470. `./src/emacs-EMACSVERSION'; you may wish to make a symbolic link named
  471. `/usr/local/bin/emacs' pointing to that alternate name, as an easy way
  472. of installing different versions.
  473.  
  474. You can delete `./src/temacs'.
  475.  
  476. 5) Copy the programs `b2m', `emacsclient', `ctags', `etags', and
  477. `rcs2log' from `./lib-src' to `/usr/local/bin'.  These programs are
  478. intended for users to run.
  479.  
  480. 6) Copy the man pages in `./etc' for emacs, ctags, and etags into the
  481. appropriate man directories.
  482.  
  483. 7) The files in the `./src' subdirectory, except for `emacs', are not
  484. used by Emacs once it is built.  The source would be handy for
  485. debugging.
  486.  
  487.  
  488. PROBLEMS
  489.  
  490. See the file PROBLEMS in this directory for a list of various
  491. problems sometimes encountered, and what to do about them.
  492.  
  493.  
  494.